import React from 'react'

export default () => 
{
    const location = useLocation() //等价于js当中的location
    const {pathname} = location

    const SwtichTab = (url: string):void => React.navigate(url)

    return (
        <>
            <React.UI.TabBar style={{width: '100%'}} onChange={SwtichTab} activeKey={pathname}>
                <React.UI.TabBar.Item key={"/"} title={"首页"} icon={<React.ICON.AppOutline />} />
                <React.UI.TabBar.Item key={"/business"} title={"我的"} icon={<React.ICON.UserOutline />} />
            </React.UI.TabBar>
        </>
    )
}